<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<style type="text/css">
	
</style>

<div class="t_bar">
	人员情况（单位：人）
</div>
	<table  id="zh_persons" border="0" cellspacing="0" cellpadding="0" class="table01" >
		
			<tr >
				<td   align="center"  width="150px" rowspan="2">
					职工总人数
				</td>
				<td  align="center" width="150px" rowspan="2">
					<span
						name="organizations/organization[0]/people_count_total"><x:out
								select="$xmlData/data/organization_persons/people_count_total" />
					</span>&nbsp;
					<input type="hidden" value="<x:out select="$xmlData/data/organization_persons/people_count_total" />"  id="people_count_total">
				</td>
				<td width="150px"  align="center" rowspan="2">
					大专以上人员人数及<br>占总人数百分比
				</td>
				<td width="150px"  align="center">
					<span name="organizations/organization[0]/degree_total" id="1d1egree_total"><x:out select="$xmlData/data/organizations/organization[@submit_org=1]/degree_total" /></span>
					<input type="hidden" id='degree_college' value="<x:out select='$xmlData/data/organization_persons/degree_college' />">
				    <input type="hidden" id='degree_bachelor' value="<x:out select='$xmlData/data/organization_persons/degree_bachelor' />">
				    <input type="hidden" id='degree_master' value="<x:out select='$xmlData/data/organization_persons/degree_master' />">
				    <input type="hidden" id='degree_doctor' value="<x:out select='$xmlData/data/organization_persons/degree_doctor' />">
				    
				</td>
				<td  align="center" width="150px" rowspan="2">
					研究开发人员人数<br>及总数百分比
				</td>
				<td width="150px"  align="center">
					<span name="organizations/organization[0]/work_yanfa"><x:out select="$xmlData/data/organization_persons/work_yanfa" /></span>&nbsp;
					<input type="hidden" value="<x:out select="$xmlData/data/organization_persons/work_yanfa" />" id="work_yanfa"/>
				</td>
				
			</tr>
			<tr>	
				<td  align="center">
					<span name="organizations/organization[0]/degree_total_rate" id="degree_total_rate"></span>&nbsp;
				</td>
				<td  align="center">
					<span name="organizations/organization[0]/work_yanfa_rate" id="1wo1rk_yanfa_rate"></span>&nbsp;
				</td>
			</tr>
	</table>
	<br>
	<div class="t_bar">
	<span class='color_red'>*</span>法定代表人情况
	</div>
	<table  id="tblFaren" border="0" cellspacing="1" width="100%" cellpadding="0" class="t_css">
		<tr class="t_bar">
			<td align="center" >姓名</td>
			<td align="center" >出生年月</td>
			<td align="center" nowrap >现任职时间</td>
			<td align="center" nowrap >证件类型</td>
			<td align="center" nowrap >证件号码</td>  
		</tr>
		<tr>
			<td align="center">
			    <input type="text" maxlength="50" class="required" label="法定代表人情况->姓名" name="org_persons/organization_person[00]/cname" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/cname"/>" />
			    <input type="hidden" name="cname" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/cname"/>">
			</td>
			<td align="center">
			    <c:set var="farenbirthday"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/birthday"/></c:set> 
			    <cpt:date id="farenbirthday" name="org_persons/organization_person[00]/birthday" value="${farenbirthday}"  size="10" className="required date" label="法定代表人情况->出生年月"></cpt:date>
			</td>
			<td align="center">
				<c:set var="frserving_time"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/serving_time"/></c:set> 
			    <cpt:date id="frserving_time" name="org_persons/organization_person[00]/serving_time" value="${frserving_time}" size="10" 
				className="required date dateCompareAfterE:frserving_time:farenbirthday" label="法定代表人情况->现任职时间"></cpt:date>
			</td>
			<td align="center" nowrap>
		        <input type="hidden"  name="org_persons/organization_person[00]@psn_type" value="faren">
		        <c:set var="farencardtype"><x:out select="$xmlData/data/organization_persons/person[@type='faren']/id_type_value"/></c:set>
			    <c:set var="farencardtype2"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/faren_card_type_value"/></c:set>
			    <c:if test="${farencardtype2=='' }">
			       <cpt:select id="faren_card_type" key="id_type" value="${farencardtype}" className="select_width" onChange="changeCardType(this,'faren','法定代表人情况');"></cpt:select>
			    </c:if>
			    <c:if test="${farencardtype2!='' }">
			       <cpt:select id="faren_card_type" key="id_type" value="${farencardtype2}" onChange="changeCardType(this,'faren','法定代表人情况');"></cpt:select>
			    </c:if>
		        <input type="hidden" id="faren_card_type_value" name="org_persons/organization_person[00]/faren_card_type_value" value="${farencardtype2}" label="证件类型" class="required"/>
				<input type="hidden" name="org_persons/organization_person[00]/faren_card_type_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/faren_card_type_name"/>" />
				<input type="hidden" name="faren_card_type_value" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/id_type_value"/>">
			    <input type="hidden" name="faren_card_type_name" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/id_type_name"/>">
		    </td>
		    <td align="center">
				<input type="text" maxlength="18" width="300px" id="faren_id_no" class='required' label=""  id='id_no1' name="org_persons/organization_person[00]/id_no" 
					value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/id_no"/>"/>
				<input type="hidden" name="id_no" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/id_no"/>">
			</td>
		<tr class="t_bar">	
			<td align="center" >最高学历</td>
			<td align="center" >专业</td>
			<td align="center" >电话</td>
			<td align="center" >手机</td>
			<td align="center" nowrap >Email</td>
		</tr>
		<tr>
			
			<td align="center">
			    <c:set var="freducate"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/freducate_background_value"/></c:set>
				<cpt:select id="freducate_background"  key="educate"  className="select_width" value="${freducate}" ></cpt:select>
				<input type="hidden" id="freducate_background_value" name="org_persons/organization_person[00]/freducate_background_value"  class="required" value="${freducate}" label="法定代表人情况->最高学历">
				<input type="hidden" name="org_persons/organization_person[00]/freducate_background_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/freducate_background_name" />">
				<input type="hidden" id="freducate_background_value2" name="freducate_background" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/educate_background_value"/>">
			</td>
		    <td align="center">
				<input type="text" maxlength="50" label="法定代表人情况->专业" class="required"  name="org_persons/organization_person[00]/major" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/major"/>"/>
			</td>
			
			<td align="center">
				<input type="text" maxlength="50" label="法定代表人情况->电话" class="required" name="org_persons/organization_person[00]/tel" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/tel"/>"/>
				<input type="hidden" name="tel" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/tel"/>">
			</td>
			
			<td align="center">
				<input type="text" maxlength="11" label="法定代表人情况->手机" class="required mobile"  name="org_persons/organization_person[00]/mobile" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/mobile"/>"/>
				<input type="hidden" name="mobile" value="<x:out select="$xmlData/data/organization_persons/person[@type='faren']/mobile"/>">
			</td>
			<td align="center">
				<input type="text" maxlength="50" label="法定代表人情况->Email" class="required email"  name="org_persons/organization_person[00]/email" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='faren']/email"/>"/>
			</td>
			
		</tr>
		
	</table>
	
	<br>
	<div class="t_bar">
	<span class='color_red'>*</span>单位负责人情况
	</div>
	<table  id="tblfuzeren" border="0" width="100%" cellspacing="1" cellpadding="0" class="t_css" >
		<tr class="t_bar">
			<td align="center" >姓名</td>
			<td align="center" >出生年月</td>
			<td align="center" nowrap >现任职时间</td>
			<td align="center" nowrap >证件类型</td>
			<td align="center" nowrap >证件号码</td>  
		</tr>
		<tr>
			<td align="center" >
				<input type="text" name="org_persons/organization_person[01]/cname" maxlength="50" class="required" label="单位负责人情况->姓名" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/cname"/>" />
				<input type="hidden" name="cname" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/cname"/>">
			</td>
			<td align="center" >
				<c:set var="fuzerenbirthday"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/birthday"/></c:set> 
				<cpt:date id="fuzerenbirthday" name="org_persons/organization_person[01]/birthday" value="${fuzerenbirthday}" size="16" className="required date" label="单位负责人情况->出生年月"></cpt:date>
            </td>
            <td align="center" >
				<c:set var="fzrservingtime"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/serving_time"/></c:set> 
			    <cpt:date id="fzrservingtime" name="org_persons/organization_person[01]/serving_time" value="${fzrservingtime}" size="16" className="required date dateCompareAfterE:fzrservingtime:fuzerenbirthday" label="单位负责人情况->现任职时间"></cpt:date>	
			</td>
			<td align="center" nowrap>
		        <input type="hidden"  name="org_persons/organization_person[01]@psn_type" value="fuzeren">
		        <c:set var="fuzerencardtype"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_type_value"/></c:set>
			    <c:set var="fuzerencardtype2"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/fuzeren_card_type_value"/></c:set>
			    <c:if test="${fuzerencardtype2=='' }">
			       <cpt:select id="fuzeren_card_type" key="id_type" value="${fuzerencardtype}" className="select_width" onChange="changeCardType(this,'fuzeren','单位负责人情况');"></cpt:select>
			    </c:if>
			    <c:if test="${fuzerencardtype2!='' }">
			       <cpt:select id="fuzeren_card_type" key="id_type" value="${fuzerencardtype2}" onChange="changeCardType(this,'fuzeren','单位负责人情况');"></cpt:select>
			    </c:if>
		        <input type="hidden"  id="fuzeren_card_type_value" name="org_persons/organization_person[01]/fuzeren_card_type_value" value="${fuzerencardtype2}" label="证件类型" class="required"/>
				<input type="hidden" name="org_persons/organization_person[01]/fuzeren_card_type_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/fuzeren_card_type_name"/>" />
				<input type="hidden" name="fuzeren_card_type_value" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_type_value"/>">
			    <input type="hidden" name="fuzeren_card_type_name" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_type_name"/>">
		    </td>
		    <td align="center">
				<input type="text" maxlength="18" width="300px" id="fuzeren_id_no" class='required' label=""  id='id_no1' name="org_persons/organization_person[01]/id_no" 
					value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/id_no"/>"/>
				<input type="hidden" name="id_no" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/id_no"/>">
			</td>
		</tr>
		<tr class="t_bar">	
			<td align="center" >最高学历</td>
			<td align="center" >专业</td>
			<td align="center" >电话</td>
			<td align="center" >手机</td>
			<td align="center" nowrap >Email</td>
		</tr>
		<tr>
			<td align="center" >
			 <c:set var="fzreducate"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/fzreducate_background_value"/></c:set>
			 <c:set var="educate"><x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/educate_background_value"/></c:set>
				<cpt:select id="fzreducate_background"  key="educate"  className="select_width" value="${fzreducate}"></cpt:select>
				<input type="hidden" id="fzreducate_background_value" name="org_persons/organization_person[01]/fzreducate_background_value"  class="required" value="${fzreducate}" label="单位负责人情况->最高学历">
				<input type="hidden" name="org_persons/organization_person[01]/fzreducate_background_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/fzreducate_background_name" />">
				<input type="hidden" id="fzreducate_background2" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/educate_background_value"/>">
			</td>
			<td align="center" >
				<input type="text" maxlength="50" class='required ' label="单位负责人情况->专业"  name="org_persons/organization_person[01]/major" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/major"/>"/>
			</td>
		     <td align="center" >
				<input type="text"  maxlength="20" class='required' label="单位负责人情况->电话"  name="org_persons/organization_person[01]/tel" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/tel"/>"/>
				<input type="hidden" name="tel" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/tel"/>">
			</td>
			<td align="center" >
				<input type="text"  maxlength="11" class='required mobile' label="单位负责人情况->手机"   name="org_persons/organization_person[01]/mobile" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/mobile"/>"/>
				<input type="hidden" name="mobile" value="<x:out select="$xmlData/data/organization_persons/person[@type='fuzeren']/mobile"/>">
			</td>
			 <td align="center" >
				<input type="text" maxlength="50" class='required email' label="单位负责人情况->Email"  name="org_persons/organization_person[01]/email" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='fuzeren']/email"/>"/>
			</td>
		</tr>
		
	</table>
	
	
	<br>
	<div class="t_bar">
	<span class='color_red'>*</span>单位研发负责人情况
	</div>
	<table  width="100%" border="0" cellspacing="1" cellpadding="0" class="t_css" >
		<tr class="t_bar">
			<td align="center" >姓名</td>
			<td align="center" >出生年月</td>
			<td align="center" nowrap >现任职时间</td>
		    <td align="center" nowrap >证件类型</td>
			<td align="center" nowrap >证件号码</td>  
		</tr>
		<tr>
			<td  align="center" >
				<input type="hidden" name="org_persons/organization_person[02]@psn_type" value="jishuren">
			    <input type="text" class="required" label="单位研发负责人情况->姓名" maxlength="50" name="org_persons/organization_person[02]/cname" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/cname"/>" />
			</td>
			<td  align="center" >
			    <c:set var="jishurenbirthday"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/birthday"/></c:set> 
			    <cpt:date id="jishurenbirthday" name="org_persons/organization_person[02]/birthday" value="${jishurenbirthday}" size="16" className="required date" label="单位研发负责人情况->出生年月"></cpt:date>
			</td>
			<td  align="center" >
			<c:set var="jsrservingtime"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/serving_time"/></c:set> 
			<cpt:date id="jsrservingtime" name="org_persons/organization_person[02]/serving_time" value="${jsrservingtime}" size="16" className="required date dateCompareAfterE:jsrservingtime:jishurenbirthday" label="单位研发负责人情况->现任职时间"></cpt:date>	
			</td>
			<td align="center" nowrap>
			    <c:set var="jishurencardtype2"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/jishuren_card_type_value"/></c:set>
			    <cpt:select id="jishuren_card_type" key="id_type" value="${jishurencardtype2}" onChange="changeCardType(this,'jishuren','单位研发负责人');"></cpt:select>
		        <input type="hidden" id="jishuren_card_type_value" name="org_persons/organization_person[02]/jishuren_card_type_value" value="${fuzerencardtype2}" label="证件类型" class="required"/>
				<input type="hidden" name="org_persons/organization_person[02]/jishuren_card_type_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/jishuren_card_type_name"/>" />
		    </td>
		    <td align="center">
				<input type="text" maxlength="18" width="300px" id="jishuren_id_no" class='required' label=""  id='id_no1' name="org_persons/organization_person[02]/id_no" 
					value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/id_no"/>"/>
			</td>
		</tr>
		<tr class="t_bar">	
			<td align="center" >最高学历</td>
			<td align="center" >专业</td>
			<td align="center" >电话</td>
			<td align="center" >手机</td>
			<td align="center" nowrap >Email</td>
		</tr>
		<tr>
			
			<td align="center">
			    <c:set var="jsreducate"><x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/jsreducate_background_value"/></c:set>
				<cpt:select id="jsreducate_background"  key="educate"  className="select_width" value="${jsreducate}" ></cpt:select>
				<input type="hidden" name="org_persons/organization_person[02]/jsreducate_background_value"  class="required" value="${jsreducate}" label="单位研发负责人情况->最高学历">
				<input type="hidden" name="org_persons/organization_person[02]/jsreducate_background_name" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/jsreducate_background_name" />">
			</td>
		    <td align="center">
				<input type="text" name="org_persons/organization_person[02]/major" class="required" label="单位研发负责人情况->专业" maxlength="50" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/major"/>"/>
			</td>
			<td align="center">
				<input type="text" class="required" label="单位研发负责人情况->电话" maxlength="20" name="org_persons/organization_person[02]/tel" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/tel"/>"/>		
			</td>
			<td align="center">
				<input type="text" class="required mobile" label="单位研发负责人情况->手机" maxlength="11"  name="org_persons/organization_person[02]/mobile" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/mobile"/>"/>
			</td>
			<td align="center">
				<input type="text" name="org_persons/organization_person[02]/email" class="required email" label="单位研发负责人情况->Email" maxlength="50" value="<x:out select="$xmlData/data/org_persons/organization_person[@psn_type='jishuren']/email"/>"/>
			</td>
		</tr>
	</table>
<br/>
<div class="t_bar">
	<span class="color_red">*</span>近两年获得过何种奖励及荣誉（限500字）
</div>
 <table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
          <td>
			<textarea rows="7" cols="150"  class="input_textarea required  maxlength:500"   name='proposal/goal/summary1'  label="近两年获得过何种奖励及荣誉"><x:out select="$xmlData/data/proposal/goal/summary1"/></textarea>
		  <input name="proposal/goal/summary1_hidden" type="hidden" value=""/>
		  </td>
      </tr>
 </table>
 <br/>
<div class="t_bar">
	<span class="color_red">*</span>近两年有无违规定记录（限500字）
</div>
 <table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
          <td>
			<textarea rows="7" cols="150"  class="input_textarea required  maxlength:500"   name='proposal/goal/summary2'  label="近两年有无违规定记录"><x:out select="$xmlData/data/proposal/goal/summary2"/></textarea>
		 <input name="proposal/goal/summary2_hidden" type="hidden" value=""/>
		  </td>
      </tr>
 </table>
<script type="text/javascript">
      $(function() {
         var degree_college=$("#degree_college").val();
         var degree_bachelor=$("#degree_bachelor").val();
         var degree_master=$("#degree_master").val();
         var degree_doctor=$("#degree_doctor").val();
         var count=parseInt(degree_college)+parseInt(degree_bachelor)+parseInt(degree_master)+parseInt(degree_doctor);
    
         $("#1d1egree_total").html(count);
        
         var people_count_total = parseInt($("#people_count_total").val());
         var degree_total_rate = count*100/people_count_total;
         degree_total_rate= formatNumberAuto(degree_total_rate.toString(), 9, 2, 2);
         $("#degree_total_rate").html(degree_total_rate + "%");
         var work_yanfa = $("#work_yanfa").val();
         
         var work_yanfa_rate = parseInt(work_yanfa)*100/parseInt(people_count_total);
         work_yanfa_rate = formatNumberAuto(work_yanfa_rate.toString(), 9, 2, 2);
         $("#1wo1rk_yanfa_rate").html(work_yanfa_rate + "%");
       
         initPersonValue("tblFaren");
         initPersonValue("tblfuzeren");
         
         changeCardType(document.getElementById("faren_card_type_value"),'faren','法定代表人');
         changeCardType(document.getElementById('fuzeren_card_type_value'),'fuzeren','单位负责人');
         changeCardType(document.getElementById('jishuren_card_type_value'),'jishuren','单位研发负责人');
         
      });
      
      function initPersonValue(tblName){
    	  var tbl = $("#" + tblName);
    	 
    	  tbl.find("input[type=hidden]").each(function(){
    			var id=$(this).attr("name");
    			
    			if(id==null || id=="")
    				return true;
    			var parentObj=tbl.find("[name$='/"+id+"']");
    			
    			if(parentObj.val() == null || $.trim(parentObj.val()) == ""){
    				var value= $(this).val();
	    			parentObj.val(value);
    			}
    			
    		});
    	  
      }
      
      function changeCardType(obj,type,texts){
    		var cardCodeObj = $('#'+type+'_id_no');
    		if(obj.value=="1"){
    			cardCodeObj.addClass("idCard");
    			cardCodeObj.attr("label",texts+"->身份证");
    		} else {
    			cardCodeObj.removeClass("idCard");
    			cardCodeObj.attr("label",texts+"->证件号码");
    		}
    	}
</script>